﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AutoRecipeSet.aspx.cs" Inherits="Catering.Catering_Page.system.AutoRecipeSet" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <link href="../../Style/center.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        *{margin:0px; padding:0px;}
        body{ font-size:12px;}
        .data_css{width:99%;margin-top:10px;height:310px; overflow-y:auto; overflow-x:hidden;border:#ccc 1px solid;}
        .data_css th{ background:url(../../Images/th_02bg.gif) repeat-x 0px 0px;padding:0px; text-align:center;height:29px; border-right:#ccc 1px solid; font-weight:400;}
        .data_css td{ text-align:center;height:20px; line-height:20px;}
        .btn_list{width:99%;height:30px; line-height:30px; padding:5px 0px; border:1px solid #c2def6; background-color:#e5f1ff;margin-top:10px;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div style="height:36px; line-height:36px; font-size:13px;">&nbsp;当前位置：生成食谱规则</div>
        <%if (Catering.Toolss.IsVerification(Session["RoleID"].ToString(), "System_Data.aspx", "生成食谱规则操作"))
                      { %>
        <div class="btn_list" style="margin-top:0px;">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td>&nbsp;&nbsp;&nbsp;&nbsp;餐别：<asp:DropDownList ID="Drop_Food" runat="server" CssClass="select_input_bg" style="width:120px;"></asp:DropDownList></td>
                    <td>大类：<asp:DropDownList ID="Drop_DishType" runat="server" CssClass="select_input_bg" style="width:150px;" ></asp:DropDownList></td>
                    <td>种数：<asp:DropDownList ID="Drop_TypeNum" runat="server" CssClass="select_input_bg" style="width:60px;"></asp:DropDownList></td>
                    <td><asp:Button runat="server" ID="btn_Add" CssClass="input_btn_a" Text="添加" 
                            onclick="btn_Add_Click" /></td>
                    
                    <td>&nbsp;</td>
                </tr>
            </table>
        </div>
        <%} %>
        <div class="data_css">
            <table width="100%" border="1" cellpadding="0" cellspacing="0">
                <thead>
                    <tr>
                        <th>餐别</th>
                        <th>菜品类别</th>
                        <th>默认种数</th>
                        <th>删除</th>
                    </tr>
                </thead>
                <tbody>
                    <asp:Repeater ID="Rep_AutoRecipe" runat="server" onitemcommand="Rep_AutoRecipe_ItemCommand">
                        <ItemTemplate>
                             <tr>
                                <td><%# new Catering_Rules.FoodMealType().GetModel(Convert.ToInt32(Eval("FoodID"))).FMName%></td>
                                <td><%#GetDishTypeName(Convert.ToInt32(Eval("TypeInfoID")))%></td>
                                <td><%#Eval("Number")%></td>
                                <%if (Catering.Toolss.IsVerification(Session["RoleID"].ToString(), "System_Data.aspx", "生成食谱规则操作"))
                                  { %>
                                <td><asp:ImageButton ID="img_btn" runat="server" ImageUrl="../../Images/trash.gif" OnClientClick="return confirm('确认删除？');" CommandArgument=<%#Eval("id")%> CommandName="del" /></td>
                                 <%}
                                  else
                                  { %>
                                  <td>&nbsp;</td>
                                <%} %>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
        </div>
    </form>
</body>
</html>